//
//  SchedulingCollectionViewCell.m
//  HarmonizePub
//
//  Created by rzhy on 2016/11/2.
//  Copyright © 2016年 Zy. All rights reserved.
//

#import "SchedulingCollectionViewCell.h"
#import "Config.h"

@interface SchedulingCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end

@implementation SchedulingCollectionViewCell

+ (NSString *)registerName {
    return @"SchedulingCollectionViewCell";
}

+ (CGFloat)itemHeight {
    return 44.0f;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setDataDict:(NSDictionary *)dataDict {
    _dataDict = dataDict;
    NSString *text = dataDict[@"text"];
    if (text) {
        self.titleLabel.text = text;
    } else {
        NSString *sdbzValue = dataDict[@"sdbzValue"];
        //  星期几
//        NSDate *date = [dataDict[@"jzrq"] dateStringWithFormat:@"yyyyMMdd"];
//        NSString *weekDay = [NSString stringWeekdayWithFromDate:date weekType:WeekdayDateStringTypeZhou];
//        NSString *time = [NSString stringAnalysisWithDate:date format:@"MM-dd"];
        self.titleLabel.text = [NSString stringWithFormat:@"%@ %@", dataDict[@"jzrq"], sdbzValue];
    }
}

@end
